package com.finance.system.controller;

import com.finance.framework.controller.BaseController;
import com.finance.framework.controller.Result;
import com.finance.system.bean.pojo.Carrier;
import com.finance.system.service.ICarrierService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

/**
 * 承运商管理
 * @Author: gly
 * @Date: Created in 2017-08-07
 */
@Controller
@RequestMapping("/system/carrier")
public class CarrierController extends BaseController{
    @Resource
    private ICarrierService carrierService;
    @RequestMapping("/listall")
    public Result listAll(){
        List<Carrier> carrierList =carrierService.listAll();
        return getSuccessResult(carrierList);
    }
    @RequestMapping("/carriers")
    public Result listall(){
        List<Carrier> carriers = carrierService.list();
        return getSuccessResult(carriers);
    }

}
